// ChristmasTree.less
.christmas-tree {
  position: relative;
  width: 100px;
  height: 150px;
  background-color: transparent;
  margin: 50px auto;

  &::before,
  &::after,
  &-small {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0;
  }

  &::before {
    top: 0;
    border-bottom: 100px solid green; /* 圣诞树的底部 */
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
  }

  &::after {
    top: 100px;
    border-top: 50px solid yellow; /* 圣诞树的中部 */
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
  }

  &-small {
    top: 150px;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid red; /* 圣诞树顶部的星星 */
  }
}